;;; init-markdown.el --- Configuration for markdown mode -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

(with-eval-after-load 'markdown-mode
  (defun ctrlwei/markdown-preview (&optional output-buffer-name)
    "Use EAF preview markdown file."
    (eaf-open (buffer-file-name)))
  (advice-add #'markdown-preview :override #'ctrlwei/markdown-preview)

  (setq markdown-command-needs-filename t)
  (setq markdown-spaces-after-code-fence 0))

(provide 'init-markdown)
;;; init-markdown.el ends here
